package com.px.chapter_Nov_1;

public class PX {
    public static void main(String[] args) {
        int a[] = new int[10];
        ArraryMath.inArraryRandom(a,10);
        int b[] = new int[20];
        ArraryMath.inArraryRandom(b,20);
        ArraryMath.outArrary(a);
        ArraryMath.outArrary(b);
        System.out.println("\n");int c[]=ArraryMath.arraryLink(a,b);
        ArraryMath.outArrary(c);

    }

    private static void cPx(int[] a) {
        for (int i = 1; i < a.length; i++) {
            int aa = a[i], j;
            for (j = i - 1; j >= 0 && a[j] > aa; j--) {
                a[j + 1] = a[j];
            }
            a[j + 1] = aa;
        }
    }


    private static void pX1(int[] a) {
        for (int i = 0; i < a.length - 1; i++) {
            int k = i;
            for (int j = i + 1; j < a.length; j++) {
                if (a[i] < a[k]) k = i;
            }
            if (i != k) {
                int t = a[i];
                a[i] = a[k];
                a[k] = t;
            }
        }
    }

}
